package consts

const (
	BusinessFail    int    = 0
	BusinessFailMsg string = "业务失败"
	ItemNotExist    int    = 4
	ItemNotExistMsg string = "操作的数据不存在"
	//验证码
	CodeInvalid    int    = 1008
	CodeInvalidMsg string = "验证码错误"

	// 进程被结束
	ProcessKilled string = "收到信号，进程被结束"
	// 表单验证器前缀
	ValidatorPrefix              string = ""
	ValidatorParamsCheckFailCode int    = -400300
	ValidatorParamsCheckFailMsg  string = "参数校验失败"

	//服务器代码发生错误
	ServerOccurredErrorCode int    = -500100
	ServerOccurredErrorMsg  string = "服务器内部发生代码执行错误, "

	// token相关
	JwtTokenOK            int    = 200100           //token有效
	JwtTokenInvalid       int    = -400100          //无效的token
	JwtTokenExpired       int    = -400101          //过期的token
	JwtTokenFormatErrCode int    = -400102          //提交的 token 格式错误
	JwtTokenFormatErrMsg  string = "提交的 token 格式错误" //提交的 token 格式错误

	//SnowFlake 雪花算法
	StartTimeStamp = int64(1483228800000)             //开始时间截 (2017-01-01)
	MachineIdBits  = uint(10)                         //机器id所占的位数
	SequenceBits   = uint(12)                         //序列所占的位数
	SequenceMask   = int64(-1 ^ (-1 << SequenceBits)) //
	MachineIdShift = SequenceBits                     //机器id左移位数
	TimestampShift = SequenceBits + MachineIdBits     //时间戳左移位数

	// CURD 常用业务状态码
	CurdStatusOkCode  int    = 200
	CurdStatusOkMsg   string = "Success"
	CurdTokenFailCode int    = -400207
	CurdTokenFailMsg  string = "token错误"

	//权限分配类
	AuthAssginOkMsg    string = "权限分配成功"
	AuthAssginFailCode int    = -400400
	AuthAssginFailMsg  string = "权限分配失败"

	AuthDelOkMsg    string = "权限删除成功"
	AuthDelFailCode int    = -400401
	AuthDelFailMsg  string = "权限删除失败"
)
